//
// CPSDot.java
// Copyright (C) 2010  "Naush" <naush _ hotmail _ fr>
//
// This program is free software: you can redistribute it and/or modify
// it under the terms of the GNU Affero General Public License as
// published by the Free Software Foundation, either version 3 of the
// License, or (at your option) any later version.
//
// This program is distributed in the hope that it will be useful,
// but WITHOUT ANY WARRANTY; without even the implied warranty of
// MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
// GNU Affero General Public License for more details.
//
// You should have received a copy of the GNU Affero General Public License
// along with this program.  If not, see <http://www.gnu.org/licenses/>./* ----------------------------------------------------------------------------







package org.ryzom.nel.threed;

import org.ryzom.nel.misc.IStream;

public class CPSDot {
  private long swigCPtr;
  protected boolean swigCMemOwn;

  public CPSDot(long cPtr, boolean cMemoryOwn) {
    swigCMemOwn = cMemoryOwn;
    swigCPtr = cPtr;
  }

  public static long getCPtr(CPSDot obj) {
    return (obj == null) ? 0 : obj.swigCPtr;
  }

  protected void finalize() {
    delete();
  }

  public synchronized void delete() {
    if (swigCPtr != 0) {
      if (swigCMemOwn) {
        swigCMemOwn = false;
        nel3dJNI.delete_CPSDot(swigCPtr);
      }
      swigCPtr = 0;
    }
  }

  public CPSDot() {
    this(nel3dJNI.new_CPSDot(), true);
  }

  public void serial(IStream f) {
    nel3dJNI.CPSDot_serial(swigCPtr, this, IStream.getCPtr(f), f);
  }

  public boolean hasTransparentFaces() {
    return nel3dJNI.CPSDot_hasTransparentFaces(swigCPtr, this);
  }

  public boolean hasOpaqueFaces() {
    return nel3dJNI.CPSDot_hasOpaqueFaces(swigCPtr, this);
  }

  public boolean hasLightableFaces() {
    return nel3dJNI.CPSDot_hasLightableFaces(swigCPtr, this);
  }

  public long getNumWantedTris() {
    return nel3dJNI.CPSDot_getNumWantedTris(swigCPtr, this);
  }

  public static void initVertexBuffers() {
    nel3dJNI.CPSDot_initVertexBuffers();
  }

  public boolean supportGlobalColorLighting() {
    return nel3dJNI.CPSDot_supportGlobalColorLighting(swigCPtr, this);
  }

  public void setZBias(float value) {
    nel3dJNI.CPSDot_setZBias(swigCPtr, this, value);
  }

  public float getZBias() {
    return nel3dJNI.CPSDot_getZBias(swigCPtr, this);
  }

}
